<include file="../Public/head" />
<script type="text/javascript" src="../Public/js/jqueryui/js/jquery-ui-1.8.20.custom.min.js"></script>
        <script type="text/javascript" src="../Public/js/jqueryui/development-bundle/ui/i18n/jquery.ui.datepicker-zh-CN.js"></script>
        <link type="text/css" href="../Public/js/jqueryui/css/ui-lightness/jquery-ui-1.8.20.custom.css" rel="stylesheet" />
        <script>
            $(function(){
                    // Datepicker
                    $('#date').datepicker({
                            inline: true,
                            dateFormat: "yy-mm-dd" 
                    });
            });
        </script>

        <div class="add">
            <form method="post" action="{:U('doadd',array('place'=>$place))}">
            <table>
                
                <if condition="$place eq 1">
                    <tr>
                        <td>增加账户</td>
                        <td>
                            <select name="in_sid">
                                <if condition="$type eq 0">
                                    <foreach name="list.c_sort" item="vo">
                                        <option value="{$vo.sid}">{$vo.name}</option>
                                    </foreach>
                                </if>
                                <if condition="$type eq 1">
                                    <foreach name="list.d_sort" item="vo">
                                        <option value="{$vo.sid}">{$vo.name}</option>
                                    </foreach>
                                </if>
                            </select>
                            <input type="hidden" name="exp_sid" value="0" />
                        </td>
                    </tr>
                    
                </if>
                <if condition="$place eq 2">
                    <tr>
                        <td>转出账户</td>
                        <td>
                            <select name="exp_sid">
                                <if condition="$type eq 3">
                                    <foreach name="list.d_sort" item="vo">
                                        <option value="{$vo.sid}">{$vo.name}</option>
                                    </foreach>
                                <else />
                                    <foreach name="list.c_sort" item="vo">
                                        <option value="{$vo.sid}">{$vo.name}</option>
                                    </foreach>
                                </if>
                                
                            </select>
                        </td>
                    </tr>
                    <tr>
                    <td>转入账户</td>
                        <td>
                            <select name="in_sid">
                                <if condition="($type eq 1) or ($type eq 3)">
                                <foreach name="list.c_sort" item="vo">
                                    <option value="{$vo.sid}">{$vo.name}</option>
                                </foreach>
                                </if>
                                <if condition="$type eq 2">
                                    <foreach name="list.d_sort" item="vo">
                                        <option value="{$vo.sid}">{$vo.name}</option>
                                    </foreach>
                                </if>
                            </select>
                        </td>
                    </tr>
                </if>
                <if condition="$place eq 3">
                    <tr>
                        <td>转出账户</td>
                        <td>
                            <select name="exp_sid">
                                <foreach name="list.sort" item="vo">
                                    <option value="{$vo.sid}">{$vo.name}</option>
                                </foreach>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>消费种类</td>
                        <td>
                            <select name="in_sid">
                                <foreach name="list.exp" item="vo">
                                    <option value="{$vo.sid}">{$vo.name}</option>
                                </foreach>
                            </select>
                        </td>
                    </tr>
                </if>
                
                <tr>
                    <td>金额</td>
                    <td>
                        <input type="text" value="" name="number" />
                    </td>
                </tr>
                <tr>
                    <td>备注</td>
                    <td>
                        <input type="text" value="" name="content" />
                    </td>
                </tr>
                <tr>
                    <td>日期</td>
                    <td>
                        <input id="date" type="text" value="{:date('Y-m-d')}" name="time" readonly="" />
                    </td>
                </tr>
                <tr>
                    <td>操作账户</td>
                    <td>
                        <select name="smid">
                            <option value="0">无</option>
                            <foreach name="member" item="vo">
                                <option value="{$vo.id}">{$vo.name}</option>
                            </foreach>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td><input type="submit" value="添加账目" /></td>
                </tr>
            </table>
            </form>
        </div>
<include file="../Public/foot" />